package com.itheima.fanxing3;

import java.util.ArrayList;
import java.util.Arrays;

public class Demo01 {

    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("坤坤");
        list.add("鹿鹿");
        list.add("签签");
        list.add("滔滔");

       /* Object[] array = list.toArray();
       //System.out.println(Arrays.toString(array));
        for (Object o : array) {
            String s= (String) o;
            System.out.println(s.length());
        }
*/
        String[] strings = new String[list.size()];
        String[] array = list.toArray(strings);
        for (String s : array) {
            System.out.println(s.length());
        }
    }

}
